package com.example.springboot_jdk8.service.impl;

import cn.hutool.json.JSONArray;
import com.example.springboot_jdk8.entity.MdmOrg;
import com.example.springboot_jdk8.enums.PullDataConfigEnum;
import com.example.springboot_jdk8.service.AbsConvertOrgData;
import org.springframework.stereotype.Service;

import java.util.List;

import static com.example.springboot_jdk8.enums.PullDataConfigEnum.INCRE;

/**
 * 增量数据转换
 */
@Service
public class IncrementDataConvertImpl extends AbsConvertOrgData<MdmOrg> {

    private final PullDataConfigEnum FINAL_INCRE = INCRE;


    /**
     * 增量转换数据
     * @param pullDataConfigEnum
     * @return
     */
    @Override
    public Boolean supportConvertDataModel(PullDataConfigEnum pullDataConfigEnum) {
        return pullDataConfigEnum.equals(FINAL_INCRE);
    }

    @Override
    public List<MdmOrg> convert(JSONArray subOrgList) {
        return convertOrg0(subOrgList);
    }

    /**
     * 具体实现转换
     * @param subOrgList
     * @return
     */
    @Override
    public List<MdmOrg> convertOrg0(JSONArray subOrgList) {



        return null;
    }
}
